﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectBZJ
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ywxt.ProjectBZJ;

    class ProjectFwfSQDetail_Map : ClassMapping<ProjectFwfSQDetail>
    {
        public ProjectFwfSQDetail_Map()
        {
            //映射ID
            Id(x => x.rId, map => {
                map.Length(40);
                map.Column("r_id");
            });

            Property(x => x.IsValid, map => { 
                map.Column("is_valid"); 
            });
            Property(x => x.CreateDate, map =>
            {
                map.Column("create_date");
            });

            Property(x => x.fwfRemark, map =>
            {
                map.Column("fwf_remark");
                map.Length(100000);
            });

            Property(x => x.fwfValue, map =>
            {
                map.Column("fwf_value");
            });

            Property(x => x.rFlag, map =>
            {
                map.Column("r_flag");
            });

            Property(x => x.pjFlag, map =>
            {
                map.Column("pj_flag");
            });

            Property(x => x.tuiValue, map =>
            {
                map.Column("tui_value");
            });

            Property(x => x.DZFP_Flag, map =>
            {

            });

            Property(x => x.DZSJ_Flag, map =>
            {

            });

            Property(x => x.YDZ_Flag, map =>
            {

            });

            Property(x => x.YKYT_Flag, map =>
            {

            });

            Property(x => x.fwfPJHM, map =>
            {
                map.Column("fwf_pjhm");
                map.Length(40);
            });

            //关联
            ManyToOne(x => x.PE, map =>
            {
                map.Column("pe_id");
            });

            //关联
            ManyToOne(x => x.Sq, map =>
            {
                map.Column("sq_id");
            });

            Table("t_fwf_sq_details");

            //不进行创建
            //SchemaAction(NHibernate.Mapping.ByCode.SchemaAction.None);
        }
    }
}
